package es.xpt.ysf.commons.jaas;

import java.security.Principal;
import java.util.ResourceBundle;

import es.xpt.ysf.dao.DAOErrors;
import es.xpt.ysf.dao.DAOException;
import es.xpt.ysf.dao.DbDAOFactory;

public class JaasDAOFactory extends DbDAOFactory {
	
	  private static DAOErrors errors = new DAOErrors(ResourceBundle.getBundle("es.xpt.ysf.commons.jaas.JaasDAOErrors"));
		  
	  public JaasDAOFactory(Principal principal) throws DAOException {
	    super( principal );
	  }
	  
	  public UsersDAO getUsersDAO() {
		return new UsersDAO(con, principal, errors);
	  }
	  
	  public RolesDAO getRolesDAO() {
			return new RolesDAO(con, principal, errors);
		  }

}
